home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Leonardo the Inventor
/
Leonardo The Inventor (93026)(Broderbund)(Riverdeep)(2004).iso
/
LEOWINMV
/
DATABASE.DIR
/
00097_Script_EQUIVALENT TERMS
< prev
next >
Wrap
Text File
|
1996-03-28
|
1KB
|
35 lines
-- ---------------------------------------------------------------
-- Handler initalizeEquivalentTerms initializes the global variable
-- equivalentTerms to the field "equivalent terms" for use in
-- hypertexting.
on initalizeEquivalentTerms
global equivalentTerms
set equivalentTerms = field "equivalent terms"
end
-- ---------------------------------------------------------------
-- Handler getEquivalentTerm returns a topic's equivalent term
-- by looking up the term in the global property list equivalentTerms
-- and returning the value of the property
on getEquivalentTerm whichTerm
global equivalentTerms
set foundEqTerm = FALSE
set eqTermLine = binSearchFirstItemInLine(equivalentTerms, whichTerm, ":")
if (eqTermLine > 0) then
set foundEqTerm = TRUE
set the itemDelimiter = ":"
set eqTerm = item 2 of line eqTermLine of equivalentTerms
set the itemDelimiter = ","
return eqTerm
end if
if not(foundEqTerm) then
return -1
alert("Could not find equivalent term for" && whichTerm)
end if
end